package com.itheima.reader;

import java.io.FileReader;
import java.io.IOException;
import java.io.Reader;



public class ReaderDemo {

    public static void main(String[] args) throws IOException {

        Reader reader = new FileReader("day11\\a.txt");


        //一次一个字符
        int a = -1;
        while ((a = reader.read()) != -1){
            System.out.print((char)a);
        }


        //一次一个字符数组
        /*char[] chars = new char[1024];
        int b = -1;
        while ((b = reader.read(chars)) != -1){
            System.out.println(new String(chars,0,b));
        }*/

        reader.close();

    }
}
